#ifndef TC_TA_HH
#define TC_TA_HH

/** \file TA.hh 
 * Global declarations for the TA (Technical Analysis) library.
 *
 * (C) Copyright by Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id: TA.hh 110 2006-06-19 03:38:33Z semihc $
 *
 *
 */

#include <QtGlobal>
#include "Global.hh"


namespace TC {

  //! Floating point type to be used for internal calculations.
  typedef double TAfp_t;

  //! Integral type to be used for internal calculations.
  typedef qint32 TAint_t;


  //! Type of price
  typedef TAfp_t   TAprice_t;

  //! Type of volume
  typedef TAfp_t  TAvolume_t;



  //! Generic TA function adaptor for arrays
  template <typename T>
  struct ArrayAdaptor
  {
    // TYPES
    //! Price type
    typedef T Price_t;
    typedef T Volume_t;

    // ACCESSORS
    //! Function call operator
    TAfp_t operator()(T val) const
    { return static_cast<TAfp_t>(val); }
  };

} // end namespace




#endif /* Include guard */
